package one.stand.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import one.stand.enums.LoginEnum;
import one.stand.model.ResultModel;
import one.stand.request.NoticeRequest;
import one.stand.response.NoticeResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: QIK
 * @CreateDate: 2019/5/28 18:13
 */
@RequestMapping("crmApi/notice")
@RestController
@Api(description = "公告列表")
public class NoticeController extends BaseController {

    @ApiOperation(value = "小程序获取公告")
    @PostMapping("selectEffectiveList")
    public ResultModel<List<NoticeResponse>> selectEffectiveList(){
        return crmFegin.selectEffectiveList(new NoticeRequest(){{
            setLoginProgramName(LoginEnum.CRM.getCode());
        }});
    }

}
